﻿Imports System.Collections.Generic

Public Class frmConstructorList

    Public ConstructorColumnsSelected() As String

    Private Sub cmdCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancel.Click
        Me.Hide()
    End Sub

    Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
        Dim lst As New List(Of String)
        For i As Long = 0 To grd.Rows.Count - 2
            Dim ColumnName As String = grd.Rows(i).Cells(0).Value
            If lst.Contains(ColumnName) Then
                'do nothing
            Else
                lst.Add(ColumnName)
            End If
        Next

        ConstructorColumnsSelected = lst.ToArray()
        Me.Hide()
    End Sub

    Private Sub grd_RowsAdded(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewRowsAddedEventArgs) Handles grd.RowsAdded

    End Sub
End Class